home *** CD-ROM | disk | FTP | other *** search
/ Aminet 23 / Aminet 23 (1998)(GTI - Schatztruhe)[!][Feb 1998].iso / Aminet / misc / emu / amiSPIMsrc.lha / scanner.h < prev    next >
C/C++ Source or Header  |  1994-01-17  |  2KB  |  58 lines

  1. /* SPIM S20 MIPS simulator.
  2.    Interface to lexical scanner.
  3.    Copyright (C) 1990-1994 by James Larus (larus@cs.wisc.edu).
  4.    ALL RIGHTS RESERVED.
  5.  
  6.    SPIM is distributed under the following conditions:
  7.  
  8.      You may make copies of SPIM for your own use and modify those copies.
  9.  
  10.      All copies of SPIM must retain my name and copyright notice.
  11.  
  12.      You may not sell SPIM or distributed SPIM in conjunction with a
  13.      commerical product or service without the expressed written consent of
  14.      James Larus.
  15.  
  16.    THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  17.    IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  18.    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  19.    PURPOSE. */
  20.  
  21.  
  22. /* $Header: /home/primost/larus/Software/SPIM/RCS/scanner.h,v 1.5 1994/01/18 03:21:45 larus Exp larus $
  23. */
  24.  
  25.  
  26. /* Exported functions (besides yylex): */
  27.  
  28. #ifdef __STDC__
  29. void initialize_scanner (FILE *in_file);
  30. void print_erroneous_line (void);
  31. void scanner_start_line (void);
  32. int register_name_to_number (char *name);
  33. char *source_line (void);
  34. int yylex ();
  35. #else
  36. void initialize_scanner ();
  37. void print_erroneous_line ();
  38. void scanner_start_line ();
  39. int register_name_to_number ();
  40. char *source_line ();
  41. int yylex ();
  42. #endif
  43.  
  44. /* Exported Variables: */
  45.  
  46. /* This flag tells the scanner to treat the next sequence of letters
  47.    etc as an identifier and not look it up as an opcode. It permits us
  48.    to use opcodes as symbols in most places.  However, because of the
  49.    LALR(1) lookahead, it does not work for labels. */
  50.  
  51. extern int only_id;
  52.  
  53. extern int yylval;        /* Value of token from YYLEX */
  54.  
  55. extern int line_no;        /* Line number in input file*/
  56.  
  57. extern int y_str_length;    /* Length of Y_STR */
  58.